In [1]:
%pylab
%matplotlib inline


Using matplotlib backend: agg
Populating the interactive namespace from numpy and matplotlib

In [2]:
cd ..


/home/scott/Documents/git/neukrill-net-work

In [3]:
import sys
import numpy as np
import skimage
import cv2
import sklearn
import imp

In [4]:
from holoviews import *


:0: FutureWarning: IPython widgets are experimental and may change in the future.

In [5]:
import neukrill_net.utils
import neukrill_net.highlevelfeatures

In [6]:
settings = neukrill_net.utils.Settings('settings.json')

In [7]:
X,y = settings.flattened_train_paths(settings.classes)

In [8]:
attrlst = ['height','width','numpixels','aspectratio','mean','std','stderr','numwhite','propwhite','numnonwhite','propnonwhite','numblack','propblack','numbool','propbool']

Checking what the smallest image sizes are


In [9]:
hlf = neukrill_net.highlevelfeatures.BasicAttributes(['height','width'])

In [10]:
XA = hlf.transform(X)

In [11]:
XA.shape


Out[11]:
(1, 30336, 2)

In [12]:
np.amin(XA,1)


Out[12]:
array([[ 21.,  31.]])

In [13]:
XA_ = hlf.transform(settings.image_fnames['test'])

In [14]:
XA_.shape


Out[14]:
(1, 130400, 2)

In [15]:
np.amin(XA_,1)


Out[15]:
array([[ 21.,  31.]])

Use all the attributes


In [ ]:
hlf = neukrill_net.highlevelfeatures.BasicAttributes(attrlst)